<!-- 
    @author Wójcik Karol <wojcikk@student.agh.edu.pl>
    @licence http://www.gnu.org/copyleft/gpl.html GNU/GPL
-->

<div id="colOne">
    <%= render :partial => "menu" %>
</div>
<div id="colTwo">
    
<% if @marks.blank? %>
    <h1>Aktualnie nie ma dost&#281;pnych stopni naukowych</h1>
<% else %>
<h1>Stopnie naukowe</h1>

<table>
  <tr>
  <% for column in Mark.content_columns %>
    <th><%= column.human_name %></th>
  <% end %>
  </tr>
  
<% for mark in @marks %>
  <tr>
  <% for column in Mark.content_columns %>
    <td><%=h mark.send(column.name) %></td>
  <% end %>
    <td><%= link_to 'Poka&#380;', :action => 'show', :id => mark %></td>
    <td><%= link_to 'Zmie&#324;', :action => 'edit', :id => mark %></td>
    <td><%= link_to 'Usu&#324;', { :action => 'destroy', :id => mark }, :confirm => 'Are you sure?', :post => true %></td>
  </tr>
<% end %>
</table>

<%= link_to 'Strona poprzednia', { :page => @mark_pages.current.previous } if @mark_pages.current.previous %>
<%= link_to 'Strona nastepna', { :page => @mark_pages.current.next } if @mark_pages.current.next %> 

<br />
<% end %>
<%= link_to 'Utw&#243;rz nowy', :action => 'new' %>
</div>
